/**
 * @Title: SubjectItemVO
 * @Package cn.com.yiqi.wsc.Ro
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @author 会员系统组-林威
 * @date 2017/3/7 15:11
 * @version V1.0
 */
package cn.com.yiqi.wsc.Ro;

import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.Date;

/**
 *
 *@ClassName: SubjectItemVO
 * Description: TODO
 * @author 会员系统组-林威
 * @date 2017/3/7 15:11
 *
 */
public class SubjectItemVO {
    /**
     * 主键id
     */
    private Integer id;

    /**
     * 专题id
     */
    private Integer subjectId;

    /**
     * 专题商品id
     */
    private Integer itemId;

    /**
     * 专题图片
     */
    private String picUrl;

    /**
     * 专题对应商品的图片
     * */
    private String itemPic;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 卖出数量
     */
    private Integer soldCount;

    /**
     * 卖出金额
     */
    private BigDecimal soldAmount;

    /**
     * 新增时间
     */
    private Date insertTime;

    /**
     * 新增用户id
     */
    private Integer insertUserId;

    /**
     * 修改时间
     */
    private Date updateTime;

    private Integer itemOrNot;

    /**
     * 修改用户id
     */
    private Integer updateUserId;

    private String itemName;

    private BigDecimal oldPrice;

    private BigDecimal nowPrice;

    public Integer getItemOrNot() {
        return itemOrNot;
    }

    public void setItemOrNot(Integer itemOrNot) {
        this.itemOrNot = itemOrNot;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(Integer subjectId) {
        this.subjectId = subjectId;
    }

    public Integer getItemId() {
        return itemId;
    }

    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public String getItemPic() {
        return itemPic;
    }

    public void setItemPic(String itemPic) {
        this.itemPic = itemPic;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getSoldCount() {
        return soldCount;
    }

    public void setSoldCount(Integer soldCount) {
        this.soldCount = soldCount;
    }

    public BigDecimal getSoldAmount() {
        return soldAmount;
    }

    public void setSoldAmount(BigDecimal soldAmount) {
        this.soldAmount = soldAmount;
    }

    public Date getInsertTime() {
        return insertTime;
    }

    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }

    public Integer getInsertUserId() {
        return insertUserId;
    }

    public void setInsertUserId(Integer insertUserId) {
        this.insertUserId = insertUserId;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public BigDecimal getOldPrice() {
        return oldPrice;
    }

    public void setOldPrice(BigDecimal oldPrice) {
        this.oldPrice = oldPrice;
    }

    public BigDecimal getNowPrice() {
        return nowPrice;
    }

    public void setNowPrice(BigDecimal nowPrice) {
        this.nowPrice = nowPrice;
    }

    public void initUrl(String url) {
        if(StringUtils.isNotEmpty(picUrl)){
            picUrl = url + "/" + picUrl;
        }

        if(StringUtils.isNotEmpty(itemPic)){
            itemPic = url + "/" + itemPic;
        }
    }
}
